package org.wxd.media.api.record;

import java.util.Map;

/**
 * Created by wangxd on 2016/11/5.
 */
public class MediaDownLoadResult {
    private String mediaId;
    private String name;
    private String contentType;
    private String body;
    private Map<String,Object> metaData;

    MediaDownLoadResult(){

    }

    MediaDownLoadResult(Builder builder) {
        this.mediaId = builder.mediaId;
        this.name = builder.name;
        this.contentType = builder.contentType;
        this.body = builder.body;
        this.metaData = builder.metaData;
    }

    public static Builder newBuilder(){
        return new Builder();
    }

    public String mediaId() {
        return mediaId;
    }

    public String name() {
        return name;
    }

    public String contentType() {
        return contentType;
    }

    public String body() {
        return body;
    }

    public Map<String, Object> metaData() {
        return metaData;
    }

    public static class Builder{
        String mediaId;
        String name;
        String contentType;
        String body;
        Map<String,Object> metaData;

        public MediaDownLoadResult build(){
            return new MediaDownLoadResult(this);
        }

        public Builder mediaId(String mediaId) {
            this.mediaId = mediaId;
            return this;
        }

        public Builder name(String name) {
            this.name = name;
            return this;
        }

        public Builder contentType(String contentType) {
            this.contentType = contentType;
            return this;
        }

        public Builder body(String body) {
            this.body = body;
            return this;
        }

        public Builder metaData(Map<String, Object> metaData) {
            this.metaData = metaData;
            return this;
        }
    }
}
